package com.finley.flowabledemo.design.responsibility;


import cn.hutool.core.util.StrUtil;

/**
 * @description: 总监级别
 * @author: xianfei.chao
 * @date 2025/5/31 21:53
 * @version: 1.0
 */
public class Majoromo extends Manager{


    public Majoromo(String name) {
        super(name);
    }

    @Override
    public void requestApplications(Request request) {
        if (request.getRequestType() == "请假" && request.getNumber() <= 2) {
            System.out.println(StrUtil.format("{}:{}数量:{}被批准",
                    name, request.getRequestType(), request.getNumber()));
        }else{
            if (superior != null) {
                superior.requestApplications(request);
            }
        }
    }

}
